package com.ithe;

public class Student implements Comparable<Student> {
    private String name;     //姓名
    private int age;         //年龄
    private String gender;   //性别
    private String id;       //学号

    public Student() {
    }

    public Student(String name, int age, String gender, String id) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public int compareTo(Student o) {
        return 0;
    }
//
//    @Override
//    public String toString() {
//        return "Student{" +
//                "name='" + name + '\'' +
//                ", age=" + age +
//                ", gender='" + gender + '\'' +
//                ", id='" + id + '\'' +
//                '}';
//    }
//
//    @Override
//    public int compareTo(Student o) {
//        //按照学生的年龄进行排序（当前学生的年龄-比较的学生的年龄）
//        return this.age - o.age;
//    }
}
